package com.transcoachapp;

import java.io.IOException;

import com.transcoachapp.database.DataBaseHelper;

import android.os.Bundle;
import android.util.Log;
import android.app.Activity;
import android.content.Intent;

public class SplashActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        
        DataBaseHelper x=new DataBaseHelper(this);
        try {
                x.createDataBase();
        } catch (IOException e) {
                Log.i("db", "databse could not created");
        }
        new Thread(new Runnable() {
			
			public void run() {
				try {
					Thread.sleep(3000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				goToMainScreen();
				finish();
			}
		}).start();
        
        
    }
    public void goToMainScreen(){
    	Intent i = new Intent(this,MainActivity.class);
    	startActivity(i);
    }
   

}
